It's weirdly formatted because it's for Project Euler Problem 17.
:If you want some general programming challenges, Project Euler is a fun resource.
I'm not sure there's anything quite like Project Euler out there.
There are 97 sequences in the On-Line Encyclopedia of Integer Sequences ( OEIS ) referencing Project Euler problems.
But Project Euler is as much about programming as it is about mathematics, so you could take a brute force approach.
:Project euler if you are obsessed with primes, otherwise you could just search " programming contest " and do some of the tasks.
Later, the sum of diagonals have been asked in a Project Euler problem, which I've learnt of in this mailing list thread.
:BTW, Project Euler, per se, doesn't appear to have a one minute requirement, if you read all the about and problem pages then time is not mentioned anywhere.
I'm trying to improve my mathematics skills by doing the problems at Project Euler, but have hit a stumbling block with problem 48 : ( http : / / projecteuler . net / index . php ? section = problems & id = 48
I'm currently trying my best to solve a Project Euler problem, and I have a question about using the mod function on complex numbers ( i . e . the remainder after the division one, not the traditional " modulus " for complex numbers ).